<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/27
 * Time: 15:39
 */
namespace app\common;
class Temp
{
    private $name;

    public function __construct($name = 'Peter'){
        $this->name = $name;
    }

    public function setName($name = 'Peter'){
        $this->$name = $name;
    }

    public function getName(){
        return '方法是：'.__METHOD__.',属性是：'.$this->name;
    }
}